import java.util.Scanner;

public class d060_還要等多久啊 {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		
		String input, output;
		int min_now;
		
		while(sc.hasNext()) {
			input = sc.nextLine();
			min_now = Integer.parseInt(input);
			
			output = "";
			if(min_now == 25)
				output += "0";
			else if(min_now > 25)
				output += Integer.toString((60 - min_now) + 25);
			else
				output += Integer.toString(25 - min_now);
			
			System.out.println(output);
		}
	}
	
}